﻿module Enferno.Public.Web.Components.Models {

    export class PaymentServiceModel {
        public description: string;
        public imageUrl: string;
        public name: string;

        constructor();
        constructor(serverObject: any);
        constructor(serverObject?: any) {
            if (serverObject != null) {
                this.createFromServerObject(serverObject);
            }
        }

        private createFromServerObject(serverObject: any) {
            this.description = serverObject.description;
            this.imageUrl = serverObject.imageUrl;
            this.name = serverObject.name;
        }

        public serialize(): any {
            var obj: any = {};
            obj.description = this.description;
            obj.imageUrl = this.imageUrl;
            obj.name = this.name;

            return obj;
        }
    }
}  